import request from '@/utils/request'

// 查询知识库列表
export function listDataset(query) {
  return request({
    url: '/knowledge/dataset/list',
    method: 'post',
    data: query
  })
}

// 查询知识库详细
export function getDataset(datasetId) {
  return request({
    url: '/knowledge/dataset/get',
    method: 'post',
    params: {
      id: datasetId
    }
  })
}

// 新增知识库
export function addDataset(data) {
  return request({
    url: '/knowledge/dataset/add',
    method: 'post',
    data: data
  })
}

// 修改知识库
export function updateDataset(data) {
  return request({
    url: '/knowledge/dataset/edit',
    method: 'post',
    data: data
  })
}

// 删除知识库
export function delDataset(datasetId) {
  return request({
    url: '/knowledge/dataset/remove',
    method: 'post',
    data: datasetId
  })
}
